package com.xr.wage;

import com.bstek.dorado.common.*;
import com.bstek.dorado.data.*;
import com.bstek.dorado.data.db.DBStatement;
import com.bstek.dorado.view.*;
import com.bstek.dorado.view.data.*;
import com.bstek.dorado.view.control.*;
import com.xr.common.BaseViewModel;

/**
 * sendListAllViewModel
 */
public class sendListAllViewModel extends BaseViewModel {
  protected void doUpdateData(ParameterSet parameters, ParameterSet outParameters)
      throws Exception {
    // Add your code here
    super.doUpdateData(parameters, outParameters);
  }
  public void jiaojie(ParameterSet parameters, ParameterSet outParameters)
  throws Exception {
   DBStatement dbs=new DBStatement();
   Dataset dsS=getDataset("datasetSend");
   Dataset dsJ=getDataset("datasetJiaoJie");
   String manId=dsJ.getString("MANAGER_ID");
   String ownerId="";
   while(!dsS.isLast()){
	   ownerId=dsS.getString("OWNER_ID");
	   if(ownerId.equals(manId)){
		   dsS.moveNext();
		   continue;
	   }
	   dbs.setSql("update wa_send set owner_id="+manId+" where send_id="+dsS.getString("SEND_ID"));
	   dbs.execute();
	   dsS.moveNext();
   }
   dbs.close();
}
  
}
